import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;

public class CollectionTest {
    public static void main(String[] args) {
        Collection col=new ArrayList();
        col.add(123);
        col.add("hello");
        col.add(new String ("Tom"));
        col.add(false);
        Person p=new Person();
        col.add(p);
        col.add(new Person("Jerr",21));
        System.out.println(col.contains("hello"));
        System.out.println(col.contains(new String("Tom")));
        System.out.println(col.contains(p));
        System.out.println(col.contains(new Person("Jerr",21)));
        System.out.println("--------------------------------------------------------");

        Collection col1= Arrays.asList(123,"hello");
        System.out.println(col1);
        System.out.println(col.containsAll(col1));

    }
}
